package com.service.impl;

import com.domain.Grade;
import com.domain.UG;
import com.mapper.IGradeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.service.IGradeService;

import java.util.List;

/**
 * @description:
 * @author: wu linchun
 * @time: 2021/4/4 23:05
 */
@Service
public class GradeServiceImpl implements IGradeService {
    //IGradeService iGradeService;
    IGradeMapper iGradeMapper;

    @Autowired
    public GradeServiceImpl(IGradeMapper iGradeMapper) {
        this.iGradeMapper = iGradeMapper;
    }

    @Override
    public List<UG> allGrade() {
        return iGradeMapper.allGrade();
    }

    @Override
    public List<Grade> queryGradebyId(int id) {
        return iGradeMapper.queryGradebyId(id);
    }

    @Override
    public List<Grade> queryGradebySubject(String subject) {
        return iGradeMapper.queryGradebySubject(subject);
    }

    @Override
    public int addGrade(Grade grade) {
        return iGradeMapper.addGrade(grade);
    }

    @Override
    public int deleteGrade(int id, String subject) {
        return iGradeMapper.deleteGrade(id, subject);
    }

    @Override
    public int updateGrade(Grade grade) {
        return iGradeMapper.updateGrade(grade);
    }
}
